﻿#include<iostream>
#include<vector>

void test01()
{
	std::vector<int> v1;
	for (int i = 0; i < 10; ++i)
	{
		v1.push_back(i);
	}
	for (int i = 0; i < v1.size(); ++i)
	{
		std::cout << v1[i] << " ";
	}
	std::cout << '\n';

	for (int i = 0; i < v1.size(); ++i)
	{
		std::cout << v1.at(i) << " ";
	}
	std::cout << '\n';

	std::cout << "v1的第一个元素：" << v1.front() << '\n';
	std::cout << "v1的最后一个元素：" << v1.back() << '\n';
}

int main()
{
	test01();




	return 0;
}
